package team.you.change.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;
import team.you.change.pojo.Notice;
import team.you.change.pojo.Table;

public interface TableMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Table record);

    Table selectByPrimaryKey(Integer id);
    //分页查询课表信息（课表名，教师名，教室代码，班级代码，学年， ）
    List<Table> selectAll(@Param("courseName") String courseName, @Param("realName") String realName,
                          @Param("roomCode") String roomCode ,@Param("classCode") String classCode,
                          @Param("year") String year,@Param("term") Integer term,@Param("week") Integer week, @Param("sTime") String sTime,
                          @Param("eTime") String eTime,@Param("page") Integer page, @Param("limit") Integer limit);

    int updateByPrimaryKey(Table record);
    //查询课表数量
    Integer getCount(@Param("courseName") String courseName, @Param("realName") String realName,
                     @Param("roomCode") String roomCode ,@Param("classCode") String classCode,
                     @Param("year") String year,@Param("term") Integer term,@Param("week") Integer week, @Param("sTime") String sTime,
                     @Param("eTime") String eTime);

    Integer UpdateByKey(@Param("id") Integer id,@Param("value") String value,@Param("field") String field);
    //根据时间和节数查询课表
    List<Table> selectByTime(@Param("time") Date time, @Param("slot") Integer slot);
    //修改课表时间和节数
    int updateByTime(@Param("time") String time, @Param("slot") Integer slot);
}